import random

a_to_z = 'abcdefghijklmnopqrstuvwxyz'

#lst1 = []
d1 = {}

for i in range(100):
    rand_num1 = ''.join(random.sample(a_to_z,2))
    if rand_num1 not in d1.keys():
#    if rand_num1 not in lst1:
#        lst1.append(rand_num1)
        d1[rand_num1] = 1
    else:
        d1[rand_num1] +=1
lst2 = sorted(d1.items(),key=lambda item: item[1],reverse=True)
print(lst2)


# 做得不错
